/* $Id:memberlist.h jjs $ */
/*
   Copyright (C) 2007 by Jurjen Stellingwerff <jurjen@stwerff.xs4all.nl>
   Part of the Moros Project http://moros.sourceforge.net/

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License.
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY.

   See the COPYING file for more details.
*/

#ifndef MEMBERLIST_H
#define MEMBERLIST_H

#include <gtkmm.h>
#include <libglademm.h>

/// Windows for a list of members in a chat channel

class memberlist : public Gtk::Window {
  public:
	memberlist(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> refGlade); ///< window
	virtual ~memberlist();  ///< remove the window data
	virtual void members_clear();
	virtual void members_show(std::string member, std::string status);

  protected:
	Glib::RefPtr<Gnome::Glade::Xml> m_refGlade;
	virtual void clicked_close();
	virtual void clicked_whisper();
	virtual void clicked_ignore();
	Gtk::Button* members_close;
	Gtk::Button* members_whisper;
	Gtk::Button* members_ignore;
	Gtk::TreeView* members_list;
	Glib::RefPtr<Gtk::ListStore> list_store;

    /// Definition of the columns on the screen
	struct ModelColumns : public Gtk::TreeModelColumnRecord {
    	Gtk::TreeModelColumn<Glib::ustring> name;
    	Gtk::TreeModelColumn<Glib::ustring> status;
    	ModelColumns() {
			add(name); add(status);
		}
	};
	const ModelColumns cols;
};

#endif //MEMBERLIST_H
